# Dockerfile to create a docker image
# Base image
FROM zct1989/nginx-and-node:0.2

#Add files to the image
COPY .  /opt/nodejs
WORKDIR /opt/nodejs

# Install the dependenies modules
RUN  yarn \
&& npm run build \
&& cp -Rf ./dist/* /usr/share/nginx/html/ \
&& cp -Rf ./deploy/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80
